/*
 * Move.h
 *
 *  Created on: 13.10.2010
 *      Author: jilly
 */

#ifndef MOVE_H_
#define MOVE_H_
#define MOVE_QUEEN 0
#define MOVE_BISHOP 1

#include <fstream>

using namespace std;

class Move {
private:
	/** who moves - queen or bishop */
	int who;
	/** x coordinate from where goes */
	unsigned int fromX;
	/** y coordinate from where goes */
	unsigned int fromY;
	/** x coordinate where goes */
	unsigned int toX;
	/** y coordinate where goes */
	unsigned int toY;
	/** if move hits piece or not */
	bool hit;
public:
	Move(int who, unsigned int fromX, unsigned int fromY, unsigned int toX, unsigned int toY);
	Move(Move* other);
	/** clones this node = creates new node with exact same properties */
	Move* clone();
	~Move();
    int getWho() const;
    unsigned int getFromX() const;
    unsigned int getFromY() const;
    unsigned int getToX() const;
    unsigned int getToY() const;
    bool wasHit() const;
    void setHit(bool hit);
    void print();
    void write(ofstream& stream);
};

#endif /* MOVE_H_ */

